var express = require('express');
var router = express.Router();

/**
 * @api {get} /api/booklist 获取书单信息
 * @apiSampleRequest /api/booklist
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */
router.get('/bookList', require('./home/booklist'));


/**
 * @api {get} /api/booklistContent 获取书单内容
 * @apiSampleRequest /api/booklistContent
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

 router.get('/booklistContent', require('./home/booklistcontent'));

/**
 * @api {get} /api/recommend 获取精品推荐
 * @apiSampleRequest /api/recommend
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

 router.get('/recommend', require('./home/recommends'));

 /**
 * @api {get} /api/bookDetail 获取图书信息
 * @apiParam ISBN   
 * @apiSampleRequest /api/bookDetail
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

  router.get('/bookDetail', require('./home/bookDetail'));

  /**
 * @api {get} /api/commodityList 获取图书信息
 * @apiParam ISBN   
 * @apiSampleRequest /api/commodityList
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

   router.get('/commodityList', require('./home/commodityList'));

  /**
 * @api {get} /api/commodity 获取商品
 * @apiParam Art_No  货号  
 * @apiSampleRequest /api/commodity
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

   router.get('/commodity', require('./home/commodity'));

     /**
 * @api {get} /api/category 目录  
 * @apiSampleRequest /api/category
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

    router.get('/category', require('./category/category'));

 /**
 * @api {get} /api/cateSearch   分类搜索图书  
 * @apiSampleRequest /api/category
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

  router.get('/cateSearch', require('./category/cateSearch'));

 /**
 * @api {get} /api/seller   卖家主页 
 * @apiParam  user_id
 * @apiSampleRequest /api/seller
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

  router.get('/sellerInfo', require('./home/seller'));

   /**
 * @api {get} /api/follow   关注 
 * @apiParam  user_id
 * @apiSampleRequest /api/follow
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

    router.post('/follow', require('./home/follow'));

       /**
 * @api {get} /api/unfollow   关注 
 * @apiParam  user_id
 * @apiSampleRequest /api/unfollow
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

  router.delete('/follow', require('./home/unfollow'));

/**
 * @api {get} /api/search   查询图书 
 * @apiParam  searchName
 * @apiSampleRequest /api/search
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

  router.get('/search', require('./home/search'));

/**
 * @api {get} /api/searchbyisbn   查询图书 
 * @apiParam  ISBN
 * @apiSampleRequest /api/searchbyisbn
 * @apiSuccess {json} result
 * @apiVersion 1.0.0 
 */

 router.get('/searchbyisbn', require('./home/searchbyisbn'));

module.exports = router;
